module code_p2(
//时钟复位
i_clk,
i_rst_n,
//编码使能
i_code_en,
//编码控制计数器
i_code_cnt,
//输入数据
i_ls_0,
i_ls_1,
i_ls_2,
i_ls_3,
i_ls_4,
i_ls_5,
i_ls_6,
i_ls_7,
i_mp1_0,
i_mp1_1,
i_mp1_2,
i_mp1_3,
i_mp1_4,
i_mp1_5,
i_mp1_6,
i_mp1_7,
//输出数据
o_code_p2
);

//时钟复位
input              i_clk;
input              i_rst_n;
//编码使能
input              i_code_en;
//编码控制计数器
input      [8:0]   i_code_cnt;
//输入数据
input      [255:0] i_ls_0;
input      [255:0] i_ls_1;
input      [255:0] i_ls_2;
input      [255:0] i_ls_3;
input      [255:0] i_ls_4;
input      [255:0] i_ls_5;
input      [255:0] i_ls_6;
input      [255:0] i_ls_7;
input      [255:0] i_mp1_0;
input      [255:0] i_mp1_1;
input      [255:0] i_mp1_2;
input      [255:0] i_mp1_3;
input      [255:0] i_mp1_4;
input      [255:0] i_mp1_5;
input      [255:0] i_mp1_6;
input      [255:0] i_mp1_7;
//输出数据
output reg [31:0]  o_code_p2;
//p2
wire [3:0] p2_0  ;
wire [3:0] p2_1  ;
wire [3:0] p2_2  ;
wire [3:0] p2_3  ;
wire [3:0] p2_4  ;
wire [3:0] p2_5  ;
wire [3:0] p2_6  ;
wire [3:0] p2_7  ;
wire [3:0] p2_8  ;
wire [3:0] p2_9  ;
wire [3:0] p2_10 ;
wire [3:0] p2_11 ;
wire [3:0] p2_12 ;
wire [3:0] p2_13 ;
wire [3:0] p2_14 ;
wire [3:0] p2_15 ;
wire [3:0] p2_16 ;
wire [3:0] p2_17 ;
wire [3:0] p2_18 ;
wire [3:0] p2_19 ;
wire [3:0] p2_20 ;
wire [3:0] p2_21 ;
wire [3:0] p2_22 ;
wire [3:0] p2_23 ;
wire [3:0] p2_24 ;
wire [3:0] p2_25 ;
wire [3:0] p2_26 ;
wire [3:0] p2_27 ;
wire [3:0] p2_28 ;
wire [3:0] p2_29 ;
wire [3:0] p2_30 ;
wire [3:0] p2_31 ;
wire [3:0] p2_32 ;
wire [3:0] p2_33 ;
wire [3:0] p2_34 ;
wire [3:0] p2_35 ;
wire [3:0] p2_36 ;
wire [3:0] p2_37 ;
wire [3:0] p2_38 ;
wire [3:0] p2_39 ;
wire [3:0] p2_40 ;
wire [3:0] p2_41 ;
wire [3:0] p2_42 ;
wire [3:0] p2_43 ;
wire [3:0] p2_44 ;
wire [3:0] p2_45 ;
wire [3:0] p2_46 ;
wire [3:0] p2_47 ;
wire [3:0] p2_48 ;
wire [3:0] p2_49 ;
wire [3:0] p2_50 ;
wire [3:0] p2_51 ;
wire [3:0] p2_52 ;
wire [3:0] p2_53 ;
wire [3:0] p2_54 ;
wire [3:0] p2_55 ;
wire [3:0] p2_56 ;
wire [3:0] p2_57 ;
wire [3:0] p2_58 ;
wire [3:0] p2_59 ;
wire [3:0] p2_60 ;
wire [3:0] p2_61 ;
wire [3:0] p2_62 ;
wire [3:0] p2_63 ;
//ls
reg [3:0] ls_0  ;
reg [3:0] ls_1  ;
reg [3:0] ls_2  ;
reg [3:0] ls_3  ;
reg [3:0] ls_4  ;
reg [3:0] ls_5  ;
reg [3:0] ls_6  ;
reg [3:0] ls_7  ;
reg [3:0] ls_8  ;
reg [3:0] ls_9  ;
reg [3:0] ls_10 ;
reg [3:0] ls_11 ;
reg [3:0] ls_12 ;
reg [3:0] ls_13 ;
reg [3:0] ls_14 ;
reg [3:0] ls_15 ;
reg [3:0] ls_16 ;
reg [3:0] ls_17 ;
reg [3:0] ls_18 ;
reg [3:0] ls_19 ;
reg [3:0] ls_20 ;
reg [3:0] ls_21 ;
reg [3:0] ls_22 ;
reg [3:0] ls_23 ;
reg [3:0] ls_24 ;
reg [3:0] ls_25 ;
reg [3:0] ls_26 ;
reg [3:0] ls_27 ;
reg [3:0] ls_28 ;
reg [3:0] ls_29 ;
reg [3:0] ls_30 ;
reg [3:0] ls_31 ;
reg [3:0] ls_32 ;
reg [3:0] ls_33 ;
reg [3:0] ls_34 ;
reg [3:0] ls_35 ;
reg [3:0] ls_36 ;
reg [3:0] ls_37 ;
reg [3:0] ls_38 ;
reg [3:0] ls_39 ;
reg [3:0] ls_40 ;
reg [3:0] ls_41 ;
reg [3:0] ls_42 ;
reg [3:0] ls_43 ;
reg [3:0] ls_44 ;
reg [3:0] ls_45 ;
reg [3:0] ls_46 ;
reg [3:0] ls_47 ;
reg [3:0] ls_48 ;
reg [3:0] ls_49 ;
reg [3:0] ls_50 ;
reg [3:0] ls_51 ;
reg [3:0] ls_52 ;
reg [3:0] ls_53 ;
reg [3:0] ls_54 ;
reg [3:0] ls_55 ;
reg [3:0] ls_56 ;
reg [3:0] ls_57 ;
reg [3:0] ls_58 ;
reg [3:0] ls_59 ;
reg [3:0] ls_60 ;
reg [3:0] ls_61 ;
reg [3:0] ls_62 ;
reg [3:0] ls_63 ;
//mp1
reg [3:0] mp1_0 ;
reg [3:0] mp1_1 ;
reg [3:0] mp1_2 ;
reg [3:0] mp1_3 ;
reg [3:0] mp1_4 ;
reg [3:0] mp1_5 ;
reg [3:0] mp1_6 ;
reg [3:0] mp1_7 ;
reg [3:0] mp1_8 ;
reg [3:0] mp1_9 ;
reg [3:0] mp1_10;
reg [3:0] mp1_11;
reg [3:0] mp1_12;
reg [3:0] mp1_13;
reg [3:0] mp1_14;
reg [3:0] mp1_15;
reg [3:0] mp1_16;
reg [3:0] mp1_17;
reg [3:0] mp1_18;
reg [3:0] mp1_19;
reg [3:0] mp1_20;
reg [3:0] mp1_21;
reg [3:0] mp1_22;
reg [3:0] mp1_23;
reg [3:0] mp1_24;
reg [3:0] mp1_25;
reg [3:0] mp1_26;
reg [3:0] mp1_27;
reg [3:0] mp1_28;
reg [3:0] mp1_29;
reg [3:0] mp1_30;
reg [3:0] mp1_31;
reg [3:0] mp1_32;
reg [3:0] mp1_33;
reg [3:0] mp1_34;
reg [3:0] mp1_35;
reg [3:0] mp1_36;
reg [3:0] mp1_37;
reg [3:0] mp1_38;
reg [3:0] mp1_39;
reg [3:0] mp1_40;
reg [3:0] mp1_41;
reg [3:0] mp1_42;
reg [3:0] mp1_43;
reg [3:0] mp1_44;
reg [3:0] mp1_45;
reg [3:0] mp1_46;
reg [3:0] mp1_47;
reg [3:0] mp1_48;
reg [3:0] mp1_49;
reg [3:0] mp1_50;
reg [3:0] mp1_51;
reg [3:0] mp1_52;
reg [3:0] mp1_53;
reg [3:0] mp1_54;
reg [3:0] mp1_55;
reg [3:0] mp1_56;
reg [3:0] mp1_57;
reg [3:0] mp1_58;
reg [3:0] mp1_59;
reg [3:0] mp1_60;
reg [3:0] mp1_61;
reg [3:0] mp1_62;
reg [3:0] mp1_63;

//输出数据
always @(negedge i_clk or negedge i_rst_n)
if(!i_rst_n)begin
    o_code_p2 <= 32'b0;
end
else if(i_code_en)begin
    case(i_code_cnt)
        9'd281:o_code_p2 <= {p2_0  ,p2_1  ,p2_2  ,p2_3  ,p2_4  ,p2_5  ,p2_6  ,p2_7  };
        9'd282:o_code_p2 <= {p2_8  ,p2_9  ,p2_10 ,p2_11 ,p2_12 ,p2_13 ,p2_14 ,p2_15 };
        9'd283:o_code_p2 <= {p2_16 ,p2_17 ,p2_18 ,p2_19 ,p2_20 ,p2_21 ,p2_22 ,p2_23 };
        9'd284:o_code_p2 <= {p2_24 ,p2_25 ,p2_26 ,p2_27 ,p2_28 ,p2_29 ,p2_30 ,p2_31 };
        9'd285:o_code_p2 <= {p2_32 ,p2_33 ,p2_34 ,p2_35 ,p2_36 ,p2_37 ,p2_38 ,p2_39 };
        9'd286:o_code_p2 <= {p2_40 ,p2_41 ,p2_42 ,p2_43 ,p2_44 ,p2_45 ,p2_46 ,p2_47 };
        9'd287:o_code_p2 <= {p2_48 ,p2_49 ,p2_50 ,p2_51 ,p2_52 ,p2_53 ,p2_54 ,p2_55 };
        9'd288:o_code_p2 <= {p2_56 ,p2_57 ,p2_58 ,p2_59 ,p2_60 ,p2_61 ,p2_62 ,p2_63 };
    endcase
end
else begin
    o_code_p2 <= 32'b0;
end

//ls
always @(posedge i_clk or negedge i_rst_n)
if(!i_rst_n)begin
    ls_0  <= 4'b0;
    ls_1  <= 4'b0;
    ls_2  <= 4'b0;
    ls_3  <= 4'b0;
    ls_4  <= 4'b0;
    ls_5  <= 4'b0;
    ls_6  <= 4'b0;
    ls_7  <= 4'b0;
    ls_8  <= 4'b0;
    ls_9  <= 4'b0;
    ls_10 <= 4'b0;
    ls_11 <= 4'b0;
    ls_12 <= 4'b0;
    ls_13 <= 4'b0;
    ls_14 <= 4'b0;
    ls_15 <= 4'b0;
    ls_16 <= 4'b0;
    ls_17 <= 4'b0;
    ls_18 <= 4'b0;
    ls_19 <= 4'b0;
    ls_20 <= 4'b0;
    ls_21 <= 4'b0;
    ls_22 <= 4'b0;
    ls_23 <= 4'b0;
    ls_24 <= 4'b0;
    ls_25 <= 4'b0;
    ls_26 <= 4'b0;
    ls_27 <= 4'b0;
    ls_28 <= 4'b0;
    ls_29 <= 4'b0;
    ls_30 <= 4'b0;
    ls_31 <= 4'b0;
    ls_32 <= 4'b0;
    ls_33 <= 4'b0;
    ls_34 <= 4'b0;
    ls_35 <= 4'b0;
    ls_36 <= 4'b0;
    ls_37 <= 4'b0;
    ls_38 <= 4'b0;
    ls_39 <= 4'b0;
    ls_40 <= 4'b0;
    ls_41 <= 4'b0;
    ls_42 <= 4'b0;
    ls_43 <= 4'b0;
    ls_44 <= 4'b0;
    ls_45 <= 4'b0;
    ls_46 <= 4'b0;
    ls_47 <= 4'b0;
    ls_48 <= 4'b0;
    ls_49 <= 4'b0;
    ls_50 <= 4'b0;
    ls_51 <= 4'b0;
    ls_52 <= 4'b0;
    ls_53 <= 4'b0;
    ls_54 <= 4'b0;
    ls_55 <= 4'b0;
    ls_56 <= 4'b0;
    ls_57 <= 4'b0;
    ls_58 <= 4'b0;
    ls_59 <= 4'b0;
    ls_60 <= 4'b0;
    ls_61 <= 4'b0;
    ls_62 <= 4'b0;
    ls_63 <= 4'b0;
end
else if(i_code_en)begin
    if((i_code_cnt>=9'd1) && (i_code_cnt<=9'd256))begin
        ls_0  <= ls_0  ^ i_ls_0[255:252] ^ i_ls_1[255:252] ^ i_ls_2[255:252] ^ i_ls_3[255:252] ^ i_ls_4[255:252] ^ i_ls_5[255:252] ^ i_ls_6[255:252] ^ i_ls_7[255:252];
        ls_1  <= ls_1  ^ i_ls_0[251:248] ^ i_ls_1[251:248] ^ i_ls_2[251:248] ^ i_ls_3[251:248] ^ i_ls_4[251:248] ^ i_ls_5[251:248] ^ i_ls_6[251:248] ^ i_ls_7[251:248];
        ls_2  <= ls_2  ^ i_ls_0[247:244] ^ i_ls_1[247:244] ^ i_ls_2[247:244] ^ i_ls_3[247:244] ^ i_ls_4[247:244] ^ i_ls_5[247:244] ^ i_ls_6[247:244] ^ i_ls_7[247:244];
        ls_3  <= ls_3  ^ i_ls_0[243:240] ^ i_ls_1[243:240] ^ i_ls_2[243:240] ^ i_ls_3[243:240] ^ i_ls_4[243:240] ^ i_ls_5[243:240] ^ i_ls_6[243:240] ^ i_ls_7[243:240];
        ls_4  <= ls_4  ^ i_ls_0[239:236] ^ i_ls_1[239:236] ^ i_ls_2[239:236] ^ i_ls_3[239:236] ^ i_ls_4[239:236] ^ i_ls_5[239:236] ^ i_ls_6[239:236] ^ i_ls_7[239:236];
        ls_5  <= ls_5  ^ i_ls_0[235:232] ^ i_ls_1[235:232] ^ i_ls_2[235:232] ^ i_ls_3[235:232] ^ i_ls_4[235:232] ^ i_ls_5[235:232] ^ i_ls_6[235:232] ^ i_ls_7[235:232];
        ls_6  <= ls_6  ^ i_ls_0[231:228] ^ i_ls_1[231:228] ^ i_ls_2[231:228] ^ i_ls_3[231:228] ^ i_ls_4[231:228] ^ i_ls_5[231:228] ^ i_ls_6[231:228] ^ i_ls_7[231:228];
        ls_7  <= ls_7  ^ i_ls_0[227:224] ^ i_ls_1[227:224] ^ i_ls_2[227:224] ^ i_ls_3[227:224] ^ i_ls_4[227:224] ^ i_ls_5[227:224] ^ i_ls_6[227:224] ^ i_ls_7[227:224];
        ls_8  <= ls_8  ^ i_ls_0[223:220] ^ i_ls_1[223:220] ^ i_ls_2[223:220] ^ i_ls_3[223:220] ^ i_ls_4[223:220] ^ i_ls_5[223:220] ^ i_ls_6[223:220] ^ i_ls_7[223:220];
        ls_9  <= ls_9  ^ i_ls_0[219:216] ^ i_ls_1[219:216] ^ i_ls_2[219:216] ^ i_ls_3[219:216] ^ i_ls_4[219:216] ^ i_ls_5[219:216] ^ i_ls_6[219:216] ^ i_ls_7[219:216];
        ls_10 <= ls_10 ^ i_ls_0[215:212] ^ i_ls_1[215:212] ^ i_ls_2[215:212] ^ i_ls_3[215:212] ^ i_ls_4[215:212] ^ i_ls_5[215:212] ^ i_ls_6[215:212] ^ i_ls_7[215:212];
        ls_11 <= ls_11 ^ i_ls_0[211:208] ^ i_ls_1[211:208] ^ i_ls_2[211:208] ^ i_ls_3[211:208] ^ i_ls_4[211:208] ^ i_ls_5[211:208] ^ i_ls_6[211:208] ^ i_ls_7[211:208];
        ls_12 <= ls_12 ^ i_ls_0[207:204] ^ i_ls_1[207:204] ^ i_ls_2[207:204] ^ i_ls_3[207:204] ^ i_ls_4[207:204] ^ i_ls_5[207:204] ^ i_ls_6[207:204] ^ i_ls_7[207:204];
        ls_13 <= ls_13 ^ i_ls_0[203:200] ^ i_ls_1[203:200] ^ i_ls_2[203:200] ^ i_ls_3[203:200] ^ i_ls_4[203:200] ^ i_ls_5[203:200] ^ i_ls_6[203:200] ^ i_ls_7[203:200];
        ls_14 <= ls_14 ^ i_ls_0[199:196] ^ i_ls_1[199:196] ^ i_ls_2[199:196] ^ i_ls_3[199:196] ^ i_ls_4[199:196] ^ i_ls_5[199:196] ^ i_ls_6[199:196] ^ i_ls_7[199:196];
        ls_15 <= ls_15 ^ i_ls_0[195:192] ^ i_ls_1[195:192] ^ i_ls_2[195:192] ^ i_ls_3[195:192] ^ i_ls_4[195:192] ^ i_ls_5[195:192] ^ i_ls_6[195:192] ^ i_ls_7[195:192];
        ls_16 <= ls_16 ^ i_ls_0[191:188] ^ i_ls_1[191:188] ^ i_ls_2[191:188] ^ i_ls_3[191:188] ^ i_ls_4[191:188] ^ i_ls_5[191:188] ^ i_ls_6[191:188] ^ i_ls_7[191:188];
        ls_17 <= ls_17 ^ i_ls_0[187:184] ^ i_ls_1[187:184] ^ i_ls_2[187:184] ^ i_ls_3[187:184] ^ i_ls_4[187:184] ^ i_ls_5[187:184] ^ i_ls_6[187:184] ^ i_ls_7[187:184];
        ls_18 <= ls_18 ^ i_ls_0[183:180] ^ i_ls_1[183:180] ^ i_ls_2[183:180] ^ i_ls_3[183:180] ^ i_ls_4[183:180] ^ i_ls_5[183:180] ^ i_ls_6[183:180] ^ i_ls_7[183:180];
        ls_19 <= ls_19 ^ i_ls_0[179:176] ^ i_ls_1[179:176] ^ i_ls_2[179:176] ^ i_ls_3[179:176] ^ i_ls_4[179:176] ^ i_ls_5[179:176] ^ i_ls_6[179:176] ^ i_ls_7[179:176];
        ls_20 <= ls_20 ^ i_ls_0[175:172] ^ i_ls_1[175:172] ^ i_ls_2[175:172] ^ i_ls_3[175:172] ^ i_ls_4[175:172] ^ i_ls_5[175:172] ^ i_ls_6[175:172] ^ i_ls_7[175:172];
        ls_21 <= ls_21 ^ i_ls_0[171:168] ^ i_ls_1[171:168] ^ i_ls_2[171:168] ^ i_ls_3[171:168] ^ i_ls_4[171:168] ^ i_ls_5[171:168] ^ i_ls_6[171:168] ^ i_ls_7[171:168];
        ls_22 <= ls_22 ^ i_ls_0[167:164] ^ i_ls_1[167:164] ^ i_ls_2[167:164] ^ i_ls_3[167:164] ^ i_ls_4[167:164] ^ i_ls_5[167:164] ^ i_ls_6[167:164] ^ i_ls_7[167:164];
        ls_23 <= ls_23 ^ i_ls_0[163:160] ^ i_ls_1[163:160] ^ i_ls_2[163:160] ^ i_ls_3[163:160] ^ i_ls_4[163:160] ^ i_ls_5[163:160] ^ i_ls_6[163:160] ^ i_ls_7[163:160];
        ls_24 <= ls_24 ^ i_ls_0[159:156] ^ i_ls_1[159:156] ^ i_ls_2[159:156] ^ i_ls_3[159:156] ^ i_ls_4[159:156] ^ i_ls_5[159:156] ^ i_ls_6[159:156] ^ i_ls_7[159:156];
        ls_25 <= ls_25 ^ i_ls_0[155:152] ^ i_ls_1[155:152] ^ i_ls_2[155:152] ^ i_ls_3[155:152] ^ i_ls_4[155:152] ^ i_ls_5[155:152] ^ i_ls_6[155:152] ^ i_ls_7[155:152];
        ls_26 <= ls_26 ^ i_ls_0[151:148] ^ i_ls_1[151:148] ^ i_ls_2[151:148] ^ i_ls_3[151:148] ^ i_ls_4[151:148] ^ i_ls_5[151:148] ^ i_ls_6[151:148] ^ i_ls_7[151:148];
        ls_27 <= ls_27 ^ i_ls_0[147:144] ^ i_ls_1[147:144] ^ i_ls_2[147:144] ^ i_ls_3[147:144] ^ i_ls_4[147:144] ^ i_ls_5[147:144] ^ i_ls_6[147:144] ^ i_ls_7[147:144];
        ls_28 <= ls_28 ^ i_ls_0[143:140] ^ i_ls_1[143:140] ^ i_ls_2[143:140] ^ i_ls_3[143:140] ^ i_ls_4[143:140] ^ i_ls_5[143:140] ^ i_ls_6[143:140] ^ i_ls_7[143:140];
        ls_29 <= ls_29 ^ i_ls_0[139:136] ^ i_ls_1[139:136] ^ i_ls_2[139:136] ^ i_ls_3[139:136] ^ i_ls_4[139:136] ^ i_ls_5[139:136] ^ i_ls_6[139:136] ^ i_ls_7[139:136];
        ls_30 <= ls_30 ^ i_ls_0[135:132] ^ i_ls_1[135:132] ^ i_ls_2[135:132] ^ i_ls_3[135:132] ^ i_ls_4[135:132] ^ i_ls_5[135:132] ^ i_ls_6[135:132] ^ i_ls_7[135:132];
        ls_31 <= ls_31 ^ i_ls_0[131:128] ^ i_ls_1[131:128] ^ i_ls_2[131:128] ^ i_ls_3[131:128] ^ i_ls_4[131:128] ^ i_ls_5[131:128] ^ i_ls_6[131:128] ^ i_ls_7[131:128];
        ls_32 <= ls_32 ^ i_ls_0[127:124] ^ i_ls_1[127:124] ^ i_ls_2[127:124] ^ i_ls_3[127:124] ^ i_ls_4[127:124] ^ i_ls_5[127:124] ^ i_ls_6[127:124] ^ i_ls_7[127:124];
        ls_33 <= ls_33 ^ i_ls_0[123:120] ^ i_ls_1[123:120] ^ i_ls_2[123:120] ^ i_ls_3[123:120] ^ i_ls_4[123:120] ^ i_ls_5[123:120] ^ i_ls_6[123:120] ^ i_ls_7[123:120];
        ls_34 <= ls_34 ^ i_ls_0[119:116] ^ i_ls_1[119:116] ^ i_ls_2[119:116] ^ i_ls_3[119:116] ^ i_ls_4[119:116] ^ i_ls_5[119:116] ^ i_ls_6[119:116] ^ i_ls_7[119:116];
        ls_35 <= ls_35 ^ i_ls_0[115:112] ^ i_ls_1[115:112] ^ i_ls_2[115:112] ^ i_ls_3[115:112] ^ i_ls_4[115:112] ^ i_ls_5[115:112] ^ i_ls_6[115:112] ^ i_ls_7[115:112];
        ls_36 <= ls_36 ^ i_ls_0[111:108] ^ i_ls_1[111:108] ^ i_ls_2[111:108] ^ i_ls_3[111:108] ^ i_ls_4[111:108] ^ i_ls_5[111:108] ^ i_ls_6[111:108] ^ i_ls_7[111:108];
        ls_37 <= ls_37 ^ i_ls_0[107:104] ^ i_ls_1[107:104] ^ i_ls_2[107:104] ^ i_ls_3[107:104] ^ i_ls_4[107:104] ^ i_ls_5[107:104] ^ i_ls_6[107:104] ^ i_ls_7[107:104];
        ls_38 <= ls_38 ^ i_ls_0[103:100] ^ i_ls_1[103:100] ^ i_ls_2[103:100] ^ i_ls_3[103:100] ^ i_ls_4[103:100] ^ i_ls_5[103:100] ^ i_ls_6[103:100] ^ i_ls_7[103:100];
        ls_39 <= ls_39 ^ i_ls_0[99:96]   ^ i_ls_1[99:96]   ^ i_ls_2[99:96]   ^ i_ls_3[99:96]   ^ i_ls_4[99:96]   ^ i_ls_5[99:96]   ^ i_ls_6[99:96]   ^ i_ls_7[99:96]  ;
        ls_40 <= ls_40 ^ i_ls_0[95:92]   ^ i_ls_1[95:92]   ^ i_ls_2[95:92]   ^ i_ls_3[95:92]   ^ i_ls_4[95:92]   ^ i_ls_5[95:92]   ^ i_ls_6[95:92]   ^ i_ls_7[95:92]  ;
        ls_41 <= ls_41 ^ i_ls_0[91:88]   ^ i_ls_1[91:88]   ^ i_ls_2[91:88]   ^ i_ls_3[91:88]   ^ i_ls_4[91:88]   ^ i_ls_5[91:88]   ^ i_ls_6[91:88]   ^ i_ls_7[91:88]  ;
        ls_42 <= ls_42 ^ i_ls_0[87:84]   ^ i_ls_1[87:84]   ^ i_ls_2[87:84]   ^ i_ls_3[87:84]   ^ i_ls_4[87:84]   ^ i_ls_5[87:84]   ^ i_ls_6[87:84]   ^ i_ls_7[87:84]  ;
        ls_43 <= ls_43 ^ i_ls_0[83:80]   ^ i_ls_1[83:80]   ^ i_ls_2[83:80]   ^ i_ls_3[83:80]   ^ i_ls_4[83:80]   ^ i_ls_5[83:80]   ^ i_ls_6[83:80]   ^ i_ls_7[83:80]  ;
        ls_44 <= ls_44 ^ i_ls_0[79:76]   ^ i_ls_1[79:76]   ^ i_ls_2[79:76]   ^ i_ls_3[79:76]   ^ i_ls_4[79:76]   ^ i_ls_5[79:76]   ^ i_ls_6[79:76]   ^ i_ls_7[79:76]  ;
        ls_45 <= ls_45 ^ i_ls_0[75:72]   ^ i_ls_1[75:72]   ^ i_ls_2[75:72]   ^ i_ls_3[75:72]   ^ i_ls_4[75:72]   ^ i_ls_5[75:72]   ^ i_ls_6[75:72]   ^ i_ls_7[75:72]  ;
        ls_46 <= ls_46 ^ i_ls_0[71:68]   ^ i_ls_1[71:68]   ^ i_ls_2[71:68]   ^ i_ls_3[71:68]   ^ i_ls_4[71:68]   ^ i_ls_5[71:68]   ^ i_ls_6[71:68]   ^ i_ls_7[71:68]  ;
        ls_47 <= ls_47 ^ i_ls_0[67:64]   ^ i_ls_1[67:64]   ^ i_ls_2[67:64]   ^ i_ls_3[67:64]   ^ i_ls_4[67:64]   ^ i_ls_5[67:64]   ^ i_ls_6[67:64]   ^ i_ls_7[67:64]  ;
        ls_48 <= ls_48 ^ i_ls_0[63:60]   ^ i_ls_1[63:60]   ^ i_ls_2[63:60]   ^ i_ls_3[63:60]   ^ i_ls_4[63:60]   ^ i_ls_5[63:60]   ^ i_ls_6[63:60]   ^ i_ls_7[63:60]  ;
        ls_49 <= ls_49 ^ i_ls_0[59:56]   ^ i_ls_1[59:56]   ^ i_ls_2[59:56]   ^ i_ls_3[59:56]   ^ i_ls_4[59:56]   ^ i_ls_5[59:56]   ^ i_ls_6[59:56]   ^ i_ls_7[59:56]  ;
        ls_50 <= ls_50 ^ i_ls_0[55:52]   ^ i_ls_1[55:52]   ^ i_ls_2[55:52]   ^ i_ls_3[55:52]   ^ i_ls_4[55:52]   ^ i_ls_5[55:52]   ^ i_ls_6[55:52]   ^ i_ls_7[55:52]  ;
        ls_51 <= ls_51 ^ i_ls_0[51:48]   ^ i_ls_1[51:48]   ^ i_ls_2[51:48]   ^ i_ls_3[51:48]   ^ i_ls_4[51:48]   ^ i_ls_5[51:48]   ^ i_ls_6[51:48]   ^ i_ls_7[51:48]  ;
        ls_52 <= ls_52 ^ i_ls_0[47:44]   ^ i_ls_1[47:44]   ^ i_ls_2[47:44]   ^ i_ls_3[47:44]   ^ i_ls_4[47:44]   ^ i_ls_5[47:44]   ^ i_ls_6[47:44]   ^ i_ls_7[47:44]  ;
        ls_53 <= ls_53 ^ i_ls_0[43:40]   ^ i_ls_1[43:40]   ^ i_ls_2[43:40]   ^ i_ls_3[43:40]   ^ i_ls_4[43:40]   ^ i_ls_5[43:40]   ^ i_ls_6[43:40]   ^ i_ls_7[43:40]  ;
        ls_54 <= ls_54 ^ i_ls_0[39:36]   ^ i_ls_1[39:36]   ^ i_ls_2[39:36]   ^ i_ls_3[39:36]   ^ i_ls_4[39:36]   ^ i_ls_5[39:36]   ^ i_ls_6[39:36]   ^ i_ls_7[39:36]  ;
        ls_55 <= ls_55 ^ i_ls_0[35:32]   ^ i_ls_1[35:32]   ^ i_ls_2[35:32]   ^ i_ls_3[35:32]   ^ i_ls_4[35:32]   ^ i_ls_5[35:32]   ^ i_ls_6[35:32]   ^ i_ls_7[35:32]  ;
        ls_56 <= ls_56 ^ i_ls_0[31:28]   ^ i_ls_1[31:28]   ^ i_ls_2[31:28]   ^ i_ls_3[31:28]   ^ i_ls_4[31:28]   ^ i_ls_5[31:28]   ^ i_ls_6[31:28]   ^ i_ls_7[31:28]  ;
        ls_57 <= ls_57 ^ i_ls_0[27:24]   ^ i_ls_1[27:24]   ^ i_ls_2[27:24]   ^ i_ls_3[27:24]   ^ i_ls_4[27:24]   ^ i_ls_5[27:24]   ^ i_ls_6[27:24]   ^ i_ls_7[27:24]  ;
        ls_58 <= ls_58 ^ i_ls_0[23:20]   ^ i_ls_1[23:20]   ^ i_ls_2[23:20]   ^ i_ls_3[23:20]   ^ i_ls_4[23:20]   ^ i_ls_5[23:20]   ^ i_ls_6[23:20]   ^ i_ls_7[23:20]  ;
        ls_59 <= ls_59 ^ i_ls_0[19:16]   ^ i_ls_1[19:16]   ^ i_ls_2[19:16]   ^ i_ls_3[19:16]   ^ i_ls_4[19:16]   ^ i_ls_5[19:16]   ^ i_ls_6[19:16]   ^ i_ls_7[19:16]  ;
        ls_60 <= ls_60 ^ i_ls_0[15:12]   ^ i_ls_1[15:12]   ^ i_ls_2[15:12]   ^ i_ls_3[15:12]   ^ i_ls_4[15:12]   ^ i_ls_5[15:12]   ^ i_ls_6[15:12]   ^ i_ls_7[15:12]  ;
        ls_61 <= ls_61 ^ i_ls_0[11:8]    ^ i_ls_1[11:8]    ^ i_ls_2[11:8]    ^ i_ls_3[11:8]    ^ i_ls_4[11:8]    ^ i_ls_5[11:8]    ^ i_ls_6[11:8]    ^ i_ls_7[11:8]   ;
        ls_62 <= ls_62 ^ i_ls_0[7:4]     ^ i_ls_1[7:4]     ^ i_ls_2[7:4]     ^ i_ls_3[7:4]     ^ i_ls_4[7:4]     ^ i_ls_5[7:4]     ^ i_ls_6[7:4]     ^ i_ls_7[7:4]    ;
        ls_63 <= ls_63 ^ i_ls_0[3:0]     ^ i_ls_1[3:0]     ^ i_ls_2[3:0]     ^ i_ls_3[3:0]     ^ i_ls_4[3:0]     ^ i_ls_5[3:0]     ^ i_ls_6[3:0]     ^ i_ls_7[3:0]    ;
    end
end
else begin
    ls_0  <= 4'b0;
    ls_1  <= 4'b0;
    ls_2  <= 4'b0;
    ls_3  <= 4'b0;
    ls_4  <= 4'b0;
    ls_5  <= 4'b0;
    ls_6  <= 4'b0;
    ls_7  <= 4'b0;
    ls_8  <= 4'b0;
    ls_9  <= 4'b0;
    ls_10 <= 4'b0;
    ls_11 <= 4'b0;
    ls_12 <= 4'b0;
    ls_13 <= 4'b0;
    ls_14 <= 4'b0;
    ls_15 <= 4'b0;
    ls_16 <= 4'b0;
    ls_17 <= 4'b0;
    ls_18 <= 4'b0;
    ls_19 <= 4'b0;
    ls_20 <= 4'b0;
    ls_21 <= 4'b0;
    ls_22 <= 4'b0;
    ls_23 <= 4'b0;
    ls_24 <= 4'b0;
    ls_25 <= 4'b0;
    ls_26 <= 4'b0;
    ls_27 <= 4'b0;
    ls_28 <= 4'b0;
    ls_29 <= 4'b0;
    ls_30 <= 4'b0;
    ls_31 <= 4'b0;
    ls_32 <= 4'b0;
    ls_33 <= 4'b0;
    ls_34 <= 4'b0;
    ls_35 <= 4'b0;
    ls_36 <= 4'b0;
    ls_37 <= 4'b0;
    ls_38 <= 4'b0;
    ls_39 <= 4'b0;
    ls_40 <= 4'b0;
    ls_41 <= 4'b0;
    ls_42 <= 4'b0;
    ls_43 <= 4'b0;
    ls_44 <= 4'b0;
    ls_45 <= 4'b0;
    ls_46 <= 4'b0;
    ls_47 <= 4'b0;
    ls_48 <= 4'b0;
    ls_49 <= 4'b0;
    ls_50 <= 4'b0;
    ls_51 <= 4'b0;
    ls_52 <= 4'b0;
    ls_53 <= 4'b0;
    ls_54 <= 4'b0;
    ls_55 <= 4'b0;
    ls_56 <= 4'b0;
    ls_57 <= 4'b0;
    ls_58 <= 4'b0;
    ls_59 <= 4'b0;
    ls_60 <= 4'b0;
    ls_61 <= 4'b0;
    ls_62 <= 4'b0;
    ls_63 <= 4'b0;
end

//mp1
always @(posedge i_clk or negedge i_rst_n)
if(!i_rst_n)begin
    mp1_0  <= 4'b0;
    mp1_1  <= 4'b0;
    mp1_2  <= 4'b0;
    mp1_3  <= 4'b0;
    mp1_4  <= 4'b0;
    mp1_5  <= 4'b0;
    mp1_6  <= 4'b0;
    mp1_7  <= 4'b0;
    mp1_8  <= 4'b0;
    mp1_9  <= 4'b0;
    mp1_10 <= 4'b0;
    mp1_11 <= 4'b0;
    mp1_12 <= 4'b0;
    mp1_13 <= 4'b0;
    mp1_14 <= 4'b0;
    mp1_15 <= 4'b0;
    mp1_16 <= 4'b0;
    mp1_17 <= 4'b0;
    mp1_18 <= 4'b0;
    mp1_19 <= 4'b0;
    mp1_20 <= 4'b0;
    mp1_21 <= 4'b0;
    mp1_22 <= 4'b0;
    mp1_23 <= 4'b0;
    mp1_24 <= 4'b0;
    mp1_25 <= 4'b0;
    mp1_26 <= 4'b0;
    mp1_27 <= 4'b0;
    mp1_28 <= 4'b0;
    mp1_29 <= 4'b0;
    mp1_30 <= 4'b0;
    mp1_31 <= 4'b0;
    mp1_32 <= 4'b0;
    mp1_33 <= 4'b0;
    mp1_34 <= 4'b0;
    mp1_35 <= 4'b0;
    mp1_36 <= 4'b0;
    mp1_37 <= 4'b0;
    mp1_38 <= 4'b0;
    mp1_39 <= 4'b0;
    mp1_40 <= 4'b0;
    mp1_41 <= 4'b0;
    mp1_42 <= 4'b0;
    mp1_43 <= 4'b0;
    mp1_44 <= 4'b0;
    mp1_45 <= 4'b0;
    mp1_46 <= 4'b0;
    mp1_47 <= 4'b0;
    mp1_48 <= 4'b0;
    mp1_49 <= 4'b0;
    mp1_50 <= 4'b0;
    mp1_51 <= 4'b0;
    mp1_52 <= 4'b0;
    mp1_53 <= 4'b0;
    mp1_54 <= 4'b0;
    mp1_55 <= 4'b0;
    mp1_56 <= 4'b0;
    mp1_57 <= 4'b0;
    mp1_58 <= 4'b0;
    mp1_59 <= 4'b0;
    mp1_60 <= 4'b0;
    mp1_61 <= 4'b0;
    mp1_62 <= 4'b0;
    mp1_63 <= 4'b0;
end
else if(i_code_en)begin
    if((i_code_cnt>=9'd257) && (i_code_cnt<=9'd280))begin
        mp1_0  <= mp1_0  ^ i_mp1_0[255:252] ^ i_mp1_1[255:252] ^ i_mp1_2[255:252] ^ i_mp1_3[255:252] ^ i_mp1_4[255:252] ^ i_mp1_5[255:252] ^ i_mp1_6[255:252] ^ i_mp1_7[255:252];
        mp1_1  <= mp1_1  ^ i_mp1_0[251:248] ^ i_mp1_1[251:248] ^ i_mp1_2[251:248] ^ i_mp1_3[251:248] ^ i_mp1_4[251:248] ^ i_mp1_5[251:248] ^ i_mp1_6[251:248] ^ i_mp1_7[251:248];
        mp1_2  <= mp1_2  ^ i_mp1_0[247:244] ^ i_mp1_1[247:244] ^ i_mp1_2[247:244] ^ i_mp1_3[247:244] ^ i_mp1_4[247:244] ^ i_mp1_5[247:244] ^ i_mp1_6[247:244] ^ i_mp1_7[247:244];
        mp1_3  <= mp1_3  ^ i_mp1_0[243:240] ^ i_mp1_1[243:240] ^ i_mp1_2[243:240] ^ i_mp1_3[243:240] ^ i_mp1_4[243:240] ^ i_mp1_5[243:240] ^ i_mp1_6[243:240] ^ i_mp1_7[243:240];
        mp1_4  <= mp1_4  ^ i_mp1_0[239:236] ^ i_mp1_1[239:236] ^ i_mp1_2[239:236] ^ i_mp1_3[239:236] ^ i_mp1_4[239:236] ^ i_mp1_5[239:236] ^ i_mp1_6[239:236] ^ i_mp1_7[239:236];
        mp1_5  <= mp1_5  ^ i_mp1_0[235:232] ^ i_mp1_1[235:232] ^ i_mp1_2[235:232] ^ i_mp1_3[235:232] ^ i_mp1_4[235:232] ^ i_mp1_5[235:232] ^ i_mp1_6[235:232] ^ i_mp1_7[235:232];
        mp1_6  <= mp1_6  ^ i_mp1_0[231:228] ^ i_mp1_1[231:228] ^ i_mp1_2[231:228] ^ i_mp1_3[231:228] ^ i_mp1_4[231:228] ^ i_mp1_5[231:228] ^ i_mp1_6[231:228] ^ i_mp1_7[231:228];
        mp1_7  <= mp1_7  ^ i_mp1_0[227:224] ^ i_mp1_1[227:224] ^ i_mp1_2[227:224] ^ i_mp1_3[227:224] ^ i_mp1_4[227:224] ^ i_mp1_5[227:224] ^ i_mp1_6[227:224] ^ i_mp1_7[227:224];
        mp1_8  <= mp1_8  ^ i_mp1_0[223:220] ^ i_mp1_1[223:220] ^ i_mp1_2[223:220] ^ i_mp1_3[223:220] ^ i_mp1_4[223:220] ^ i_mp1_5[223:220] ^ i_mp1_6[223:220] ^ i_mp1_7[223:220];
        mp1_9  <= mp1_9  ^ i_mp1_0[219:216] ^ i_mp1_1[219:216] ^ i_mp1_2[219:216] ^ i_mp1_3[219:216] ^ i_mp1_4[219:216] ^ i_mp1_5[219:216] ^ i_mp1_6[219:216] ^ i_mp1_7[219:216];
        mp1_10 <= mp1_10 ^ i_mp1_0[215:212] ^ i_mp1_1[215:212] ^ i_mp1_2[215:212] ^ i_mp1_3[215:212] ^ i_mp1_4[215:212] ^ i_mp1_5[215:212] ^ i_mp1_6[215:212] ^ i_mp1_7[215:212];
        mp1_11 <= mp1_11 ^ i_mp1_0[211:208] ^ i_mp1_1[211:208] ^ i_mp1_2[211:208] ^ i_mp1_3[211:208] ^ i_mp1_4[211:208] ^ i_mp1_5[211:208] ^ i_mp1_6[211:208] ^ i_mp1_7[211:208];
        mp1_12 <= mp1_12 ^ i_mp1_0[207:204] ^ i_mp1_1[207:204] ^ i_mp1_2[207:204] ^ i_mp1_3[207:204] ^ i_mp1_4[207:204] ^ i_mp1_5[207:204] ^ i_mp1_6[207:204] ^ i_mp1_7[207:204];
        mp1_13 <= mp1_13 ^ i_mp1_0[203:200] ^ i_mp1_1[203:200] ^ i_mp1_2[203:200] ^ i_mp1_3[203:200] ^ i_mp1_4[203:200] ^ i_mp1_5[203:200] ^ i_mp1_6[203:200] ^ i_mp1_7[203:200];
        mp1_14 <= mp1_14 ^ i_mp1_0[199:196] ^ i_mp1_1[199:196] ^ i_mp1_2[199:196] ^ i_mp1_3[199:196] ^ i_mp1_4[199:196] ^ i_mp1_5[199:196] ^ i_mp1_6[199:196] ^ i_mp1_7[199:196];
        mp1_15 <= mp1_15 ^ i_mp1_0[195:192] ^ i_mp1_1[195:192] ^ i_mp1_2[195:192] ^ i_mp1_3[195:192] ^ i_mp1_4[195:192] ^ i_mp1_5[195:192] ^ i_mp1_6[195:192] ^ i_mp1_7[195:192];
        mp1_16 <= mp1_16 ^ i_mp1_0[191:188] ^ i_mp1_1[191:188] ^ i_mp1_2[191:188] ^ i_mp1_3[191:188] ^ i_mp1_4[191:188] ^ i_mp1_5[191:188] ^ i_mp1_6[191:188] ^ i_mp1_7[191:188];
        mp1_17 <= mp1_17 ^ i_mp1_0[187:184] ^ i_mp1_1[187:184] ^ i_mp1_2[187:184] ^ i_mp1_3[187:184] ^ i_mp1_4[187:184] ^ i_mp1_5[187:184] ^ i_mp1_6[187:184] ^ i_mp1_7[187:184];
        mp1_18 <= mp1_18 ^ i_mp1_0[183:180] ^ i_mp1_1[183:180] ^ i_mp1_2[183:180] ^ i_mp1_3[183:180] ^ i_mp1_4[183:180] ^ i_mp1_5[183:180] ^ i_mp1_6[183:180] ^ i_mp1_7[183:180];
        mp1_19 <= mp1_19 ^ i_mp1_0[179:176] ^ i_mp1_1[179:176] ^ i_mp1_2[179:176] ^ i_mp1_3[179:176] ^ i_mp1_4[179:176] ^ i_mp1_5[179:176] ^ i_mp1_6[179:176] ^ i_mp1_7[179:176];
        mp1_20 <= mp1_20 ^ i_mp1_0[175:172] ^ i_mp1_1[175:172] ^ i_mp1_2[175:172] ^ i_mp1_3[175:172] ^ i_mp1_4[175:172] ^ i_mp1_5[175:172] ^ i_mp1_6[175:172] ^ i_mp1_7[175:172];
        mp1_21 <= mp1_21 ^ i_mp1_0[171:168] ^ i_mp1_1[171:168] ^ i_mp1_2[171:168] ^ i_mp1_3[171:168] ^ i_mp1_4[171:168] ^ i_mp1_5[171:168] ^ i_mp1_6[171:168] ^ i_mp1_7[171:168];
        mp1_22 <= mp1_22 ^ i_mp1_0[167:164] ^ i_mp1_1[167:164] ^ i_mp1_2[167:164] ^ i_mp1_3[167:164] ^ i_mp1_4[167:164] ^ i_mp1_5[167:164] ^ i_mp1_6[167:164] ^ i_mp1_7[167:164];
        mp1_23 <= mp1_23 ^ i_mp1_0[163:160] ^ i_mp1_1[163:160] ^ i_mp1_2[163:160] ^ i_mp1_3[163:160] ^ i_mp1_4[163:160] ^ i_mp1_5[163:160] ^ i_mp1_6[163:160] ^ i_mp1_7[163:160];
        mp1_24 <= mp1_24 ^ i_mp1_0[159:156] ^ i_mp1_1[159:156] ^ i_mp1_2[159:156] ^ i_mp1_3[159:156] ^ i_mp1_4[159:156] ^ i_mp1_5[159:156] ^ i_mp1_6[159:156] ^ i_mp1_7[159:156];
        mp1_25 <= mp1_25 ^ i_mp1_0[155:152] ^ i_mp1_1[155:152] ^ i_mp1_2[155:152] ^ i_mp1_3[155:152] ^ i_mp1_4[155:152] ^ i_mp1_5[155:152] ^ i_mp1_6[155:152] ^ i_mp1_7[155:152];
        mp1_26 <= mp1_26 ^ i_mp1_0[151:148] ^ i_mp1_1[151:148] ^ i_mp1_2[151:148] ^ i_mp1_3[151:148] ^ i_mp1_4[151:148] ^ i_mp1_5[151:148] ^ i_mp1_6[151:148] ^ i_mp1_7[151:148];
        mp1_27 <= mp1_27 ^ i_mp1_0[147:144] ^ i_mp1_1[147:144] ^ i_mp1_2[147:144] ^ i_mp1_3[147:144] ^ i_mp1_4[147:144] ^ i_mp1_5[147:144] ^ i_mp1_6[147:144] ^ i_mp1_7[147:144];
        mp1_28 <= mp1_28 ^ i_mp1_0[143:140] ^ i_mp1_1[143:140] ^ i_mp1_2[143:140] ^ i_mp1_3[143:140] ^ i_mp1_4[143:140] ^ i_mp1_5[143:140] ^ i_mp1_6[143:140] ^ i_mp1_7[143:140];
        mp1_29 <= mp1_29 ^ i_mp1_0[139:136] ^ i_mp1_1[139:136] ^ i_mp1_2[139:136] ^ i_mp1_3[139:136] ^ i_mp1_4[139:136] ^ i_mp1_5[139:136] ^ i_mp1_6[139:136] ^ i_mp1_7[139:136];
        mp1_30 <= mp1_30 ^ i_mp1_0[135:132] ^ i_mp1_1[135:132] ^ i_mp1_2[135:132] ^ i_mp1_3[135:132] ^ i_mp1_4[135:132] ^ i_mp1_5[135:132] ^ i_mp1_6[135:132] ^ i_mp1_7[135:132];
        mp1_31 <= mp1_31 ^ i_mp1_0[131:128] ^ i_mp1_1[131:128] ^ i_mp1_2[131:128] ^ i_mp1_3[131:128] ^ i_mp1_4[131:128] ^ i_mp1_5[131:128] ^ i_mp1_6[131:128] ^ i_mp1_7[131:128];
        mp1_32 <= mp1_32 ^ i_mp1_0[127:124] ^ i_mp1_1[127:124] ^ i_mp1_2[127:124] ^ i_mp1_3[127:124] ^ i_mp1_4[127:124] ^ i_mp1_5[127:124] ^ i_mp1_6[127:124] ^ i_mp1_7[127:124];
        mp1_33 <= mp1_33 ^ i_mp1_0[123:120] ^ i_mp1_1[123:120] ^ i_mp1_2[123:120] ^ i_mp1_3[123:120] ^ i_mp1_4[123:120] ^ i_mp1_5[123:120] ^ i_mp1_6[123:120] ^ i_mp1_7[123:120];
        mp1_34 <= mp1_34 ^ i_mp1_0[119:116] ^ i_mp1_1[119:116] ^ i_mp1_2[119:116] ^ i_mp1_3[119:116] ^ i_mp1_4[119:116] ^ i_mp1_5[119:116] ^ i_mp1_6[119:116] ^ i_mp1_7[119:116];
        mp1_35 <= mp1_35 ^ i_mp1_0[115:112] ^ i_mp1_1[115:112] ^ i_mp1_2[115:112] ^ i_mp1_3[115:112] ^ i_mp1_4[115:112] ^ i_mp1_5[115:112] ^ i_mp1_6[115:112] ^ i_mp1_7[115:112];
        mp1_36 <= mp1_36 ^ i_mp1_0[111:108] ^ i_mp1_1[111:108] ^ i_mp1_2[111:108] ^ i_mp1_3[111:108] ^ i_mp1_4[111:108] ^ i_mp1_5[111:108] ^ i_mp1_6[111:108] ^ i_mp1_7[111:108];
        mp1_37 <= mp1_37 ^ i_mp1_0[107:104] ^ i_mp1_1[107:104] ^ i_mp1_2[107:104] ^ i_mp1_3[107:104] ^ i_mp1_4[107:104] ^ i_mp1_5[107:104] ^ i_mp1_6[107:104] ^ i_mp1_7[107:104];
        mp1_38 <= mp1_38 ^ i_mp1_0[103:100] ^ i_mp1_1[103:100] ^ i_mp1_2[103:100] ^ i_mp1_3[103:100] ^ i_mp1_4[103:100] ^ i_mp1_5[103:100] ^ i_mp1_6[103:100] ^ i_mp1_7[103:100];
        mp1_39 <= mp1_39 ^ i_mp1_0[99:96]   ^ i_mp1_1[99:96]   ^ i_mp1_2[99:96]   ^ i_mp1_3[99:96]   ^ i_mp1_4[99:96]   ^ i_mp1_5[99:96]   ^ i_mp1_6[99:96]   ^ i_mp1_7[99:96]  ;
        mp1_40 <= mp1_40 ^ i_mp1_0[95:92]   ^ i_mp1_1[95:92]   ^ i_mp1_2[95:92]   ^ i_mp1_3[95:92]   ^ i_mp1_4[95:92]   ^ i_mp1_5[95:92]   ^ i_mp1_6[95:92]   ^ i_mp1_7[95:92]  ;
        mp1_41 <= mp1_41 ^ i_mp1_0[91:88]   ^ i_mp1_1[91:88]   ^ i_mp1_2[91:88]   ^ i_mp1_3[91:88]   ^ i_mp1_4[91:88]   ^ i_mp1_5[91:88]   ^ i_mp1_6[91:88]   ^ i_mp1_7[91:88]  ;
        mp1_42 <= mp1_42 ^ i_mp1_0[87:84]   ^ i_mp1_1[87:84]   ^ i_mp1_2[87:84]   ^ i_mp1_3[87:84]   ^ i_mp1_4[87:84]   ^ i_mp1_5[87:84]   ^ i_mp1_6[87:84]   ^ i_mp1_7[87:84]  ;
        mp1_43 <= mp1_43 ^ i_mp1_0[83:80]   ^ i_mp1_1[83:80]   ^ i_mp1_2[83:80]   ^ i_mp1_3[83:80]   ^ i_mp1_4[83:80]   ^ i_mp1_5[83:80]   ^ i_mp1_6[83:80]   ^ i_mp1_7[83:80]  ;
        mp1_44 <= mp1_44 ^ i_mp1_0[79:76]   ^ i_mp1_1[79:76]   ^ i_mp1_2[79:76]   ^ i_mp1_3[79:76]   ^ i_mp1_4[79:76]   ^ i_mp1_5[79:76]   ^ i_mp1_6[79:76]   ^ i_mp1_7[79:76]  ;
        mp1_45 <= mp1_45 ^ i_mp1_0[75:72]   ^ i_mp1_1[75:72]   ^ i_mp1_2[75:72]   ^ i_mp1_3[75:72]   ^ i_mp1_4[75:72]   ^ i_mp1_5[75:72]   ^ i_mp1_6[75:72]   ^ i_mp1_7[75:72]  ;
        mp1_46 <= mp1_46 ^ i_mp1_0[71:68]   ^ i_mp1_1[71:68]   ^ i_mp1_2[71:68]   ^ i_mp1_3[71:68]   ^ i_mp1_4[71:68]   ^ i_mp1_5[71:68]   ^ i_mp1_6[71:68]   ^ i_mp1_7[71:68]  ;
        mp1_47 <= mp1_47 ^ i_mp1_0[67:64]   ^ i_mp1_1[67:64]   ^ i_mp1_2[67:64]   ^ i_mp1_3[67:64]   ^ i_mp1_4[67:64]   ^ i_mp1_5[67:64]   ^ i_mp1_6[67:64]   ^ i_mp1_7[67:64]  ;
        mp1_48 <= mp1_48 ^ i_mp1_0[63:60]   ^ i_mp1_1[63:60]   ^ i_mp1_2[63:60]   ^ i_mp1_3[63:60]   ^ i_mp1_4[63:60]   ^ i_mp1_5[63:60]   ^ i_mp1_6[63:60]   ^ i_mp1_7[63:60]  ;
        mp1_49 <= mp1_49 ^ i_mp1_0[59:56]   ^ i_mp1_1[59:56]   ^ i_mp1_2[59:56]   ^ i_mp1_3[59:56]   ^ i_mp1_4[59:56]   ^ i_mp1_5[59:56]   ^ i_mp1_6[59:56]   ^ i_mp1_7[59:56]  ;
        mp1_50 <= mp1_50 ^ i_mp1_0[55:52]   ^ i_mp1_1[55:52]   ^ i_mp1_2[55:52]   ^ i_mp1_3[55:52]   ^ i_mp1_4[55:52]   ^ i_mp1_5[55:52]   ^ i_mp1_6[55:52]   ^ i_mp1_7[55:52]  ;
        mp1_51 <= mp1_51 ^ i_mp1_0[51:48]   ^ i_mp1_1[51:48]   ^ i_mp1_2[51:48]   ^ i_mp1_3[51:48]   ^ i_mp1_4[51:48]   ^ i_mp1_5[51:48]   ^ i_mp1_6[51:48]   ^ i_mp1_7[51:48]  ;
        mp1_52 <= mp1_52 ^ i_mp1_0[47:44]   ^ i_mp1_1[47:44]   ^ i_mp1_2[47:44]   ^ i_mp1_3[47:44]   ^ i_mp1_4[47:44]   ^ i_mp1_5[47:44]   ^ i_mp1_6[47:44]   ^ i_mp1_7[47:44]  ;
        mp1_53 <= mp1_53 ^ i_mp1_0[43:40]   ^ i_mp1_1[43:40]   ^ i_mp1_2[43:40]   ^ i_mp1_3[43:40]   ^ i_mp1_4[43:40]   ^ i_mp1_5[43:40]   ^ i_mp1_6[43:40]   ^ i_mp1_7[43:40]  ;
        mp1_54 <= mp1_54 ^ i_mp1_0[39:36]   ^ i_mp1_1[39:36]   ^ i_mp1_2[39:36]   ^ i_mp1_3[39:36]   ^ i_mp1_4[39:36]   ^ i_mp1_5[39:36]   ^ i_mp1_6[39:36]   ^ i_mp1_7[39:36]  ;
        mp1_55 <= mp1_55 ^ i_mp1_0[35:32]   ^ i_mp1_1[35:32]   ^ i_mp1_2[35:32]   ^ i_mp1_3[35:32]   ^ i_mp1_4[35:32]   ^ i_mp1_5[35:32]   ^ i_mp1_6[35:32]   ^ i_mp1_7[35:32]  ;
        mp1_56 <= mp1_56 ^ i_mp1_0[31:28]   ^ i_mp1_1[31:28]   ^ i_mp1_2[31:28]   ^ i_mp1_3[31:28]   ^ i_mp1_4[31:28]   ^ i_mp1_5[31:28]   ^ i_mp1_6[31:28]   ^ i_mp1_7[31:28]  ;
        mp1_57 <= mp1_57 ^ i_mp1_0[27:24]   ^ i_mp1_1[27:24]   ^ i_mp1_2[27:24]   ^ i_mp1_3[27:24]   ^ i_mp1_4[27:24]   ^ i_mp1_5[27:24]   ^ i_mp1_6[27:24]   ^ i_mp1_7[27:24]  ;
        mp1_58 <= mp1_58 ^ i_mp1_0[23:20]   ^ i_mp1_1[23:20]   ^ i_mp1_2[23:20]   ^ i_mp1_3[23:20]   ^ i_mp1_4[23:20]   ^ i_mp1_5[23:20]   ^ i_mp1_6[23:20]   ^ i_mp1_7[23:20]  ;
        mp1_59 <= mp1_59 ^ i_mp1_0[19:16]   ^ i_mp1_1[19:16]   ^ i_mp1_2[19:16]   ^ i_mp1_3[19:16]   ^ i_mp1_4[19:16]   ^ i_mp1_5[19:16]   ^ i_mp1_6[19:16]   ^ i_mp1_7[19:16]  ;
        mp1_60 <= mp1_60 ^ i_mp1_0[15:12]   ^ i_mp1_1[15:12]   ^ i_mp1_2[15:12]   ^ i_mp1_3[15:12]   ^ i_mp1_4[15:12]   ^ i_mp1_5[15:12]   ^ i_mp1_6[15:12]   ^ i_mp1_7[15:12]  ;
        mp1_61 <= mp1_61 ^ i_mp1_0[11:8]    ^ i_mp1_1[11:8]    ^ i_mp1_2[11:8]    ^ i_mp1_3[11:8]    ^ i_mp1_4[11:8]    ^ i_mp1_5[11:8]    ^ i_mp1_6[11:8]    ^ i_mp1_7[11:8]   ;
        mp1_62 <= mp1_62 ^ i_mp1_0[7:4]     ^ i_mp1_1[7:4]     ^ i_mp1_2[7:4]     ^ i_mp1_3[7:4]     ^ i_mp1_4[7:4]     ^ i_mp1_5[7:4]     ^ i_mp1_6[7:4]     ^ i_mp1_7[7:4]    ;
        mp1_63 <= mp1_63 ^ i_mp1_0[3:0]     ^ i_mp1_1[3:0]     ^ i_mp1_2[3:0]     ^ i_mp1_3[3:0]     ^ i_mp1_4[3:0]     ^ i_mp1_5[3:0]     ^ i_mp1_6[3:0]     ^ i_mp1_7[3:0]    ;
    end
end
else begin
    mp1_0  <= 4'b0;
    mp1_1  <= 4'b0;
    mp1_2  <= 4'b0;
    mp1_3  <= 4'b0;
    mp1_4  <= 4'b0;
    mp1_5  <= 4'b0;
    mp1_6  <= 4'b0;
    mp1_7  <= 4'b0;
    mp1_8  <= 4'b0;
    mp1_9  <= 4'b0;
    mp1_10 <= 4'b0;
    mp1_11 <= 4'b0;
    mp1_12 <= 4'b0;
    mp1_13 <= 4'b0;
    mp1_14 <= 4'b0;
    mp1_15 <= 4'b0;
    mp1_16 <= 4'b0;
    mp1_17 <= 4'b0;
    mp1_18 <= 4'b0;
    mp1_19 <= 4'b0;
    mp1_20 <= 4'b0;
    mp1_21 <= 4'b0;
    mp1_22 <= 4'b0;
    mp1_23 <= 4'b0;
    mp1_24 <= 4'b0;
    mp1_25 <= 4'b0;
    mp1_26 <= 4'b0;
    mp1_27 <= 4'b0;
    mp1_28 <= 4'b0;
    mp1_29 <= 4'b0;
    mp1_30 <= 4'b0;
    mp1_31 <= 4'b0;
    mp1_32 <= 4'b0;
    mp1_33 <= 4'b0;
    mp1_34 <= 4'b0;
    mp1_35 <= 4'b0;
    mp1_36 <= 4'b0;
    mp1_37 <= 4'b0;
    mp1_38 <= 4'b0;
    mp1_39 <= 4'b0;
    mp1_40 <= 4'b0;
    mp1_41 <= 4'b0;
    mp1_42 <= 4'b0;
    mp1_43 <= 4'b0;
    mp1_44 <= 4'b0;
    mp1_45 <= 4'b0;
    mp1_46 <= 4'b0;
    mp1_47 <= 4'b0;
    mp1_48 <= 4'b0;
    mp1_49 <= 4'b0;
    mp1_50 <= 4'b0;
    mp1_51 <= 4'b0;
    mp1_52 <= 4'b0;
    mp1_53 <= 4'b0;
    mp1_54 <= 4'b0;
    mp1_55 <= 4'b0;
    mp1_56 <= 4'b0;
    mp1_57 <= 4'b0;
    mp1_58 <= 4'b0;
    mp1_59 <= 4'b0;
    mp1_60 <= 4'b0;
    mp1_61 <= 4'b0;
    mp1_62 <= 4'b0;
    mp1_63 <= 4'b0;
end

//p2
assign p2_0  = ls_0  ^ mp1_0 ;
assign p2_1  = ls_1  ^ mp1_1 ;
assign p2_2  = ls_2  ^ mp1_2 ;
assign p2_3  = ls_3  ^ mp1_3 ;
assign p2_4  = ls_4  ^ mp1_4 ;
assign p2_5  = ls_5  ^ mp1_5 ;
assign p2_6  = ls_6  ^ mp1_6 ;
assign p2_7  = ls_7  ^ mp1_7 ;
assign p2_8  = ls_8  ^ mp1_8 ;
assign p2_9  = ls_9  ^ mp1_9 ;
assign p2_10 = ls_10 ^ mp1_10;
assign p2_11 = ls_11 ^ mp1_11;
assign p2_12 = ls_12 ^ mp1_12;
assign p2_13 = ls_13 ^ mp1_13;
assign p2_14 = ls_14 ^ mp1_14;
assign p2_15 = ls_15 ^ mp1_15;
assign p2_16 = ls_16 ^ mp1_16;
assign p2_17 = ls_17 ^ mp1_17;
assign p2_18 = ls_18 ^ mp1_18;
assign p2_19 = ls_19 ^ mp1_19;
assign p2_20 = ls_20 ^ mp1_20;
assign p2_21 = ls_21 ^ mp1_21;
assign p2_22 = ls_22 ^ mp1_22;
assign p2_23 = ls_23 ^ mp1_23;
assign p2_24 = ls_24 ^ mp1_24;
assign p2_25 = ls_25 ^ mp1_25;
assign p2_26 = ls_26 ^ mp1_26;
assign p2_27 = ls_27 ^ mp1_27;
assign p2_28 = ls_28 ^ mp1_28;
assign p2_29 = ls_29 ^ mp1_29;
assign p2_30 = ls_30 ^ mp1_30;
assign p2_31 = ls_31 ^ mp1_31;
assign p2_32 = ls_32 ^ mp1_32;
assign p2_33 = ls_33 ^ mp1_33;
assign p2_34 = ls_34 ^ mp1_34;
assign p2_35 = ls_35 ^ mp1_35;
assign p2_36 = ls_36 ^ mp1_36;
assign p2_37 = ls_37 ^ mp1_37;
assign p2_38 = ls_38 ^ mp1_38;
assign p2_39 = ls_39 ^ mp1_39;
assign p2_40 = ls_40 ^ mp1_40;
assign p2_41 = ls_41 ^ mp1_41;
assign p2_42 = ls_42 ^ mp1_42;
assign p2_43 = ls_43 ^ mp1_43;
assign p2_44 = ls_44 ^ mp1_44;
assign p2_45 = ls_45 ^ mp1_45;
assign p2_46 = ls_46 ^ mp1_46;
assign p2_47 = ls_47 ^ mp1_47;
assign p2_48 = ls_48 ^ mp1_48;
assign p2_49 = ls_49 ^ mp1_49;
assign p2_50 = ls_50 ^ mp1_50;
assign p2_51 = ls_51 ^ mp1_51;
assign p2_52 = ls_52 ^ mp1_52;
assign p2_53 = ls_53 ^ mp1_53;
assign p2_54 = ls_54 ^ mp1_54;
assign p2_55 = ls_55 ^ mp1_55;
assign p2_56 = ls_56 ^ mp1_56;
assign p2_57 = ls_57 ^ mp1_57;
assign p2_58 = ls_58 ^ mp1_58;
assign p2_59 = ls_59 ^ mp1_59;
assign p2_60 = ls_60 ^ mp1_60;
assign p2_61 = ls_61 ^ mp1_61;
assign p2_62 = ls_62 ^ mp1_62;
assign p2_63 = ls_63 ^ mp1_63;

endmodule